module lang.d.types.basictypes;

import lang.d.types.dtype;
import std.metastrings;

const string BASIC_TYPE_CLASS =
`class %s: DType {
}`;

const(string) makeClassString(in string name) {
    return Format!(BASIC_TYPE_CLASS, name);
}

const string VOID_TYPE = "VoidType";
const string BOOL_TYPE = "BoolType";
const string CHAR_TYPE = "CharType";
const string DCHAR_TYPE = "DCharType";
const string WCHAR_TYPE = "WCharType";
const string BYTE_TYPE = "ByteType";
const string UBYTE_TYPE = "UByteType";
const string SHORT_TYPE = "ShortType";
const string USHORT_TYPE = "UShortType";
const string INT_TYPE = "IntType";
const string UINT_TYPE = "UIntType";
const string LONG_TYPE = "LongType";
const string ULONG_TYPE = "ULongType";
const string FLOAT_TYPE = "FloatType";
const string DOUBLE_TYPE = "DoubleType";
const string REAL_TYPE = "RealType";

mixin(makeClassString(VOID_TYPE));

mixin(makeClassString(BOOL_TYPE));

mixin(makeClassString(CHAR_TYPE));

mixin(makeClassString(DCHAR_TYPE));

mixin(makeClassString(WCHAR_TYPE));

mixin(makeClassString(BYTE_TYPE));

mixin(makeClassString(UBYTE_TYPE));

mixin(makeClassString(SHORT_TYPE));

mixin(makeClassString(USHORT_TYPE));

mixin(makeClassString(INT_TYPE));

mixin(makeClassString(UINT_TYPE));

mixin(makeClassString(LONG_TYPE));

mixin(makeClassString(ULONG_TYPE));

mixin(makeClassString(FLOAT_TYPE));

mixin(makeClassString(DOUBLE_TYPE));

mixin(makeClassString(REAL_TYPE));

